-- enter_treasure
-- created by panyl
-- 进入迷宫时，增加初始宝物

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    -- 进入迷宫后获得宝物抽取
    trigger = function(who, prop, arg)
        local rank = prop[2];
        local equip_arr = ItemM.getScrollByRank(rank);
        local classId = FormulaM.invoke("FETCH_BY_RAND", equip_arr, math.random(#equip_arr));

        return {class_id, 1};
    end,

    record = function(target, prop, path)
        return false;
    end
};